package dbz.domain.dtos;

import java.util.ArrayList;
import java.util.List;

import dbz.domain.Card;
import dbz.domain.player.DiscardPile;

public class DiscardPileDTO {

CardDTO[] cards;
	
	public DiscardPileDTO(DiscardPile discardPile) {
		List<CardDTO> cardDTOs = new ArrayList<CardDTO>();
		for(Card card : discardPile.getCards()) {
			cardDTOs.add(new CardDTO(card));
		}
		cards = cardDTOs.toArray(new CardDTO[0]);
	}

	public CardDTO[] getCards() {
		return cards;
	}

	public void setCards(CardDTO[] cards) {
		this.cards = cards;
	}
}
